import { _decorator, Component, Node, EventTouch, Button } from 'cc'
const { ccclass, property } = _decorator

// 引入事件中心
import EventManager from '../../Runtime/EventManager'

// // 引入单例
// import DataManager from '../../Runtime/DataManager'

@ccclass('ControlerManager')
export class ControlerManager extends Component {
  // 点击按钮
  clickBtn(event: EventTouch, type: string) {
    // // 获取按钮组件
    // const button = event.target.getComponent(Button)
    // // 获取customEventData
    // const customEventData = button?.clickEvents[0]?.customEventData

    // 发送方向事件
    EventManager.Instance.emit('DIRECTION', type)
  }
}
